package com.siyu.tickets.entity.base;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.siyu.tickets.entity.PayFlow;

public abstract class BasePayFlow implements Serializable {

	private static final long serialVersionUID = 3181238226753460107L;

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private Integer id;

	// fields
	private String action;
	private BigDecimal money;
	private Date createTime;
	private String remark;

	// many to one
	private com.siyu.tickets.entity.SysUser user;
	private com.siyu.tickets.entity.SysUser operator;
	private com.siyu.tickets.entity.Order order;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public com.siyu.tickets.entity.SysUser getUser() {
		return user;
	}

	public void setUser(com.siyu.tickets.entity.SysUser user) {
		this.user = user;
	}

	public com.siyu.tickets.entity.SysUser getOperator() {
		return operator;
	}

	public void setOperator(com.siyu.tickets.entity.SysUser operator) {
		this.operator = operator;
	}

	public com.siyu.tickets.entity.Order getOrder() {
		return order;
	}

	public void setOrder(com.siyu.tickets.entity.Order order) {
		this.order = order;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof PayFlow))
			return false;
		else {
			PayFlow user = (PayFlow) obj;
			if (null == this.getId() || null == user.getId())
				return false;
			else
				return (this.getId().equals(user.getId()));
		}
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId())
				return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

}
